from django.db import models
from django.contrib.auth.models import User

from business.models import Workplace


class Inventory(models.Model):
    created = models.DateTimeField(auto_now_add=True, editable=False)
    updated = models.DateTimeField(auto_now=True, editable=False)
    created_by = models.ForeignKey(User, editable=False)
    workplace = models.ForeignKey(Workplace, editable=False)


class InventoryItem(models.Model):
    created = models.DateTimeField(auto_now_add=True, editable=False)
    updated = models.DateTimeField(auto_now=True, editable=False)

    inventory = models.ForeignKey(Inventory, verbose_name='Inventar',
        help_text='Inventarul din care face parte obiectul')
    # These two are mutually exclusive (one of them has to be NULL):
    item = models.ForeignKey()
    drug = models.ForeignKey()


class Item(models.Model):
    pass


class Drug(models.Model):
    pass
